import UUID from 'UUID'

// 数据源集成策略
let SOURCE_INTEGRATION_POLICY_TYPE = {
  UNKNOWN: 0,
  ONE_TIME: 1, //一次性
  TIMED_CYCLED: 2, //周期性
  INHERIT: 3 //依赖更新
}

// 数据集更新策略
let SET_UPDATE_POLICY_TYPE = {
  UNKNOWN: 0,
  TIMED: 1, //定时更新
  INHERIT: 2 //依赖更新
}

// 01. 数据源的链接
export let DataConnector = function () {}

// 02. 一个数据源
export let DataSource = function (
  name,
  connector,
  policy,
  creator,
  createdTimestamp
) {
  this.id = new UUID()
  this.name = name
  this.connector = connector
  this.policy = policy
  this.creator = creator
  this.createdTimestamp = createdTimestamp
}

DataSource.prototype.getDBSchemaList = function () {
  return [new DataDBSchema()]
}

// 数据源集成策略
export let DataSourceIntegrationPolicy = function () {}

// 03. 一个数据源Server的Schema
export let DataDBSchema = function () {}

export let DataTable = function (name, scheme, creator, createdTimestamp) {
  this.name = name
  this.scheme = scheme
  this.creator = creator
  this.createdTimestamp = createdTimestamp
}

export let DataTableSchema = function () {}

export let DataCurser = function () {}

export let DataSet = function () {}

export let DataLineageTree = function () {}
